<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<h1>Hello</h1>
<script>
	
	var num=prompt('请输入数字')

	var i=1;
	var sum=0;

	while(i<=num){
		sum+=i*i;
		i++;
	}


	console.log(sum)

</script>
</body>
</html>